package ifpb.monteiro.p2.thread;

import javax.swing.JOptionPane;

public class UtilizandoThread {

	public static void main(String[] args) {
		System.out.println("Iniciando o programa.");

		Contador cont = new Contador();
		Contador2 cont2 = new Contador2();

		Thread thread = new Thread(cont2);
		thread.setPriority(Thread.NORM_PRIORITY);
		cont.setPriority(Thread.MAX_PRIORITY);
		JOptionPane.showMessageDialog(null, "Normal: " + Thread.NORM_PRIORITY
				+ " Max: " + Thread.MAX_PRIORITY + " Min: "
				+ Thread.MIN_PRIORITY);
		thread.start();
		cont.start();

	}
}
